\hypertarget{class_particle}{
\section{Particle Class Reference}
\label{class_particle}\index{Particle@{Particle}}
}


the unit mass object of the cloth structure  




{\ttfamily \#include $<$Particle.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_particle_a697fc5d6751489c0049dab6e7a90abdb}{Particle} (const int \_\-id=0, const float \_\-mass=1, const bool \_\-moveable=true)
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_particle_ad030d0fe7b88cf81744b127c99244ff4}{$\sim$Particle} ()
\begin{DoxyCompactList}\small\item\em dtor \end{DoxyCompactList}\item 
int \hyperlink{class_particle_ad9688047786047c9fecf0c304b4f6294}{getId} () const 
\begin{DoxyCompactList}\small\item\em return the id of the particle \end{DoxyCompactList}\item 
float \hyperlink{class_particle_af11c8e6d590e50496d637b3822e4fdaa}{getMass} () const 
\begin{DoxyCompactList}\small\item\em return the mass of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ad6f2741011d499235c7a76f56463a952}{setMass} (const float \_\-m)
\item 
ngl::Vector \hyperlink{class_particle_adbf83bb45017dd65724763a82329c86b}{getInitialPosition} () const 
\begin{DoxyCompactList}\small\item\em return the initial position of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ac9a7bb87b93c189c2153d1a9e39136ba}{setInitialPosition} (const ngl::Vector \_\-p)
\begin{DoxyCompactList}\small\item\em set the initial position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ae2758013059f1fdbbfe28ae8d423e2b7}{getLastLastPosition} () const 
\begin{DoxyCompactList}\small\item\em return the last last position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aaac2b15b45cd70fddfb6736290458e76}{getLastPosition} () const 
\begin{DoxyCompactList}\small\item\em return the last position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ab468229903b17bb8cb724f17e5b87e81}{getPosition} () const 
\begin{DoxyCompactList}\small\item\em return the current position of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a6e5693325b3f5b49458e66624576a0a7}{setPosition} (const ngl::Vector \_\-p)
\begin{DoxyCompactList}\small\item\em set the position of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a4ea44dad91df2b0374f2d40d44452b76}{updatePosition} (const ngl::Vector \_\-p)
\begin{DoxyCompactList}\small\item\em update the position of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ac02327c6b70fe3988f5bb99d2b6e33ac}{setCurrentPosition} (const ngl::Vector \_\-p)
\begin{DoxyCompactList}\small\item\em set the current position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ad31c8be63589edfba506727773967031}{getVelocity} () const 
\begin{DoxyCompactList}\small\item\em return the current velocity of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ad823b77c5f15777b71f2756698c6ec23}{setVelocity} (const ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em set the velocity of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ac9c6b664b0d604525e925a46a2fd5a7a}{setCurrentVelocity} (const ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em set the current velocity of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ab12a2455cfdb31df6dd9e67eaffee833}{getLastVelocity} () const 
\begin{DoxyCompactList}\small\item\em return the last velocity of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aa2d47cd6b196082fffc22b5f43e6d237}{getNetForce} () const 
\begin{DoxyCompactList}\small\item\em return the net force on the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_af2e82dc6a46e33becddce925b3e9c107}{setNetForce} (const ngl::Vector \_\-f)
\begin{DoxyCompactList}\small\item\em set the net force on the particle \end{DoxyCompactList}\item 
bool \hyperlink{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed}{getMoveable} () const 
\begin{DoxyCompactList}\small\item\em return the toggle flag for moveability of the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a30d4a947df68d23dce7358f290b3a93f}{setMoveable} (const bool \_\-s)
\begin{DoxyCompactList}\small\item\em set the toggle flag for moveability of the particle \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_spring}{Spring} $\ast$ $>$ $\ast$ \hyperlink{class_particle_a6aac04c18bc2b6776682f8ea874a0bea}{getNeighbourList} () const 
\begin{DoxyCompactList}\small\item\em return the list of connected springs to the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a3401ca5a32812e5655c058bc69c0982f}{clearNetForce} ()
\begin{DoxyCompactList}\small\item\em clears the net force on the particle \end{DoxyCompactList}\item 
void \hyperlink{class_particle_af2621a8d999bda809cc00a7de26742b3}{addToNetForce} (const ngl::Vector \_\-f)
\begin{DoxyCompactList}\small\item\em adds to the net force of the particle \end{DoxyCompactList}\item 
\hyperlink{class_particle}{Particle} \hyperlink{class_particle_a57f3442146253631193da3fb4890f39a}{clone} ()
\begin{DoxyCompactList}\small\item\em return a clone of the particle \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{class_particle_a24c5edf015f4c3d067acf1a054f31f93}{m\_\-id}
\begin{DoxyCompactList}\small\item\em unique id of the particle \end{DoxyCompactList}\item 
float \hyperlink{class_particle_ab78b76aeb4d163132a0c27ea4c5beb75}{m\_\-mass}
\begin{DoxyCompactList}\small\item\em mass of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a007f72451152f103007131841c6aa3ee}{m\_\-position}
\begin{DoxyCompactList}\small\item\em position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a31dc45960d8fe1d02407577e46f81b30}{m\_\-velocity}
\begin{DoxyCompactList}\small\item\em velocity of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a00d22ec44d72c0aacb4512ecf5e15af1}{m\_\-initialPosition}
\begin{DoxyCompactList}\small\item\em initial position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a82d9bec60303bd8bd78c73d77d23b30d}{m\_\-lastLastPosition}
\begin{DoxyCompactList}\small\item\em last last position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aeeb21b06bc3c2152e452226e2b25a6ea}{m\_\-lastPosition}
\begin{DoxyCompactList}\small\item\em last position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ac5c460e66588981d09c3aa86b920d8bb}{m\_\-lastVelocity}
\begin{DoxyCompactList}\small\item\em last velocity of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ad328d5b0f44818766286c928e436d36c}{m\_\-netForce}
\begin{DoxyCompactList}\small\item\em net force on the particle \end{DoxyCompactList}\item 
bool \hyperlink{class_particle_a2ee234027e38e2fa78acff949d80e8b1}{m\_\-moveable}
\begin{DoxyCompactList}\small\item\em flag for moveability \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_spring}{Spring} $\ast$ $>$ $\ast$ \hyperlink{class_particle_a99941d7f328aaaa986511113b1512492}{m\_\-neighbourList}
\begin{DoxyCompactList}\small\item\em list of connected springs \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
the unit mass object of the cloth structure 

Definition at line 23 of file Particle.h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_particle_a697fc5d6751489c0049dab6e7a90abdb}{
\index{Particle@{Particle}!Particle@{Particle}}
\index{Particle@{Particle}!Particle@{Particle}}
\subsubsection[{Particle}]{\setlength{\rightskip}{0pt plus 5cm}Particle::Particle (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-id = {\ttfamily 0}, }
\item[{const float}]{\_\-mass = {\ttfamily 1}, }
\item[{const bool}]{\_\-moveable = {\ttfamily true}}
\end{DoxyParamCaption}
)}}
\label{class_particle_a697fc5d6751489c0049dab6e7a90abdb}


ctor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-id} & the unique id of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-mass} & the mass of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-moveable} & the toggle for moveable property \\
\hline
\end{DoxyParams}


Definition at line 7 of file Particle.cpp.


\begin{DoxyCode}
{
    //init params
    m_id = _id;
    m_mass = _mass;

    m_position = 0;
    m_velocity = 0;

    m_lastLastPosition = 0;
    m_lastPosition = 0;

    m_lastVelocity = 0;

    m_initialPosition = 0;

    m_netForce = 0;

    m_moveable = _moveable;

    //init neighbours to an empty list
    m_neighbourList = new std::vector<Spring*>;
}
\end{DoxyCode}
\hypertarget{class_particle_ad030d0fe7b88cf81744b127c99244ff4}{
\index{Particle@{Particle}!$\sim$Particle@{$\sim$Particle}}
\index{$\sim$Particle@{$\sim$Particle}!Particle@{Particle}}
\subsubsection[{$\sim$Particle}]{\setlength{\rightskip}{0pt plus 5cm}Particle::$\sim$Particle (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_particle_ad030d0fe7b88cf81744b127c99244ff4}


dtor 



Definition at line 35 of file Particle.cpp.



References m\_\-neighbourList.


\begin{DoxyCode}
{
    //delete all spring objects in the list and clear the list
    for (int i = 0; i < m_neighbourList->size(); i++) delete (*m_neighbourList)[i
      ];
    delete m_neighbourList;
}
\end{DoxyCode}


\subsection{Member Function Documentation}
\hypertarget{class_particle_af2621a8d999bda809cc00a7de26742b3}{
\index{Particle@{Particle}!addToNetForce@{addToNetForce}}
\index{addToNetForce@{addToNetForce}!Particle@{Particle}}
\subsubsection[{addToNetForce}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::addToNetForce (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_af2621a8d999bda809cc00a7de26742b3}


adds to the net force of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-f} & the force to be added \\
\hline
\end{DoxyParams}


Definition at line 113 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ m_netForce += _f; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_af2621a8d999bda809cc00a7de26742b3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a3401ca5a32812e5655c058bc69c0982f}{
\index{Particle@{Particle}!clearNetForce@{clearNetForce}}
\index{clearNetForce@{clearNetForce}!Particle@{Particle}}
\subsubsection[{clearNetForce}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::clearNetForce (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a3401ca5a32812e5655c058bc69c0982f}


clears the net force on the particle 



Definition at line 109 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ m_netForce = 0; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a3401ca5a32812e5655c058bc69c0982f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a57f3442146253631193da3fb4890f39a}{
\index{Particle@{Particle}!clone@{clone}}
\index{clone@{clone}!Particle@{Particle}}
\subsubsection[{clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Particle} Particle::clone (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_particle_a57f3442146253631193da3fb4890f39a}


return a clone of the particle 



Definition at line 71 of file Particle.cpp.



References m\_\-id, m\_\-initialPosition, m\_\-lastLastPosition, m\_\-lastPosition, m\_\-lastVelocity, m\_\-mass, m\_\-moveable, m\_\-position, and m\_\-velocity.


\begin{DoxyCode}
{
    Particle p;
    p.m_id = m_id;
    p.m_initialPosition = m_initialPosition;
    p.m_lastLastPosition = m_lastLastPosition;
    p.m_lastPosition = m_lastPosition;
    p.m_lastVelocity = m_lastVelocity;
    p.m_mass = m_mass;
    p.m_moveable = m_moveable;
    p.m_position = m_position;
    p.m_velocity = m_velocity;

    return p;
}
\end{DoxyCode}
\hypertarget{class_particle_ad9688047786047c9fecf0c304b4f6294}{
\index{Particle@{Particle}!getId@{getId}}
\index{getId@{getId}!Particle@{Particle}}
\subsubsection[{getId}]{\setlength{\rightskip}{0pt plus 5cm}int Particle::getId (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ad9688047786047c9fecf0c304b4f6294}


return the id of the particle 



Definition at line 42 of file Particle.h.



References m\_\-id.


\begin{DoxyCode}
{ return m_id; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad9688047786047c9fecf0c304b4f6294_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_adbf83bb45017dd65724763a82329c86b}{
\index{Particle@{Particle}!getInitialPosition@{getInitialPosition}}
\index{getInitialPosition@{getInitialPosition}!Particle@{Particle}}
\subsubsection[{getInitialPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getInitialPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_adbf83bb45017dd65724763a82329c86b}


return the initial position of the particle 



Definition at line 49 of file Particle.h.



References m\_\-initialPosition.


\begin{DoxyCode}
{ return m_initialPosition; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_adbf83bb45017dd65724763a82329c86b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ae2758013059f1fdbbfe28ae8d423e2b7}{
\index{Particle@{Particle}!getLastLastPosition@{getLastLastPosition}}
\index{getLastLastPosition@{getLastLastPosition}!Particle@{Particle}}
\subsubsection[{getLastLastPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getLastLastPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ae2758013059f1fdbbfe28ae8d423e2b7}


return the last last position of the particle 



Definition at line 56 of file Particle.h.



References m\_\-lastLastPosition.


\begin{DoxyCode}
{ return m_lastLastPosition; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ae2758013059f1fdbbfe28ae8d423e2b7_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_aaac2b15b45cd70fddfb6736290458e76}{
\index{Particle@{Particle}!getLastPosition@{getLastPosition}}
\index{getLastPosition@{getLastPosition}!Particle@{Particle}}
\subsubsection[{getLastPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getLastPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_aaac2b15b45cd70fddfb6736290458e76}


return the last position of the particle 



Definition at line 59 of file Particle.h.



References m\_\-lastPosition.


\begin{DoxyCode}
{ return m_lastPosition; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_aaac2b15b45cd70fddfb6736290458e76_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ab12a2455cfdb31df6dd9e67eaffee833}{
\index{Particle@{Particle}!getLastVelocity@{getLastVelocity}}
\index{getLastVelocity@{getLastVelocity}!Particle@{Particle}}
\subsubsection[{getLastVelocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getLastVelocity (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ab12a2455cfdb31df6dd9e67eaffee833}


return the last velocity of the particle 



Definition at line 88 of file Particle.h.



References m\_\-lastVelocity.


\begin{DoxyCode}
{ return m_lastVelocity; }
\end{DoxyCode}
\hypertarget{class_particle_af11c8e6d590e50496d637b3822e4fdaa}{
\index{Particle@{Particle}!getMass@{getMass}}
\index{getMass@{getMass}!Particle@{Particle}}
\subsubsection[{getMass}]{\setlength{\rightskip}{0pt plus 5cm}float Particle::getMass (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_af11c8e6d590e50496d637b3822e4fdaa}


return the mass of the particle 



Definition at line 45 of file Particle.h.



References m\_\-mass.


\begin{DoxyCode}
{ return m_mass; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_af11c8e6d590e50496d637b3822e4fdaa_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed}{
\index{Particle@{Particle}!getMoveable@{getMoveable}}
\index{getMoveable@{getMoveable}!Particle@{Particle}}
\subsubsection[{getMoveable}]{\setlength{\rightskip}{0pt plus 5cm}bool Particle::getMoveable (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed}


return the toggle flag for moveability of the particle 



Definition at line 99 of file Particle.h.



References m\_\-moveable.


\begin{DoxyCode}
{ return m_moveable; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a6aac04c18bc2b6776682f8ea874a0bea}{
\index{Particle@{Particle}!getNeighbourList@{getNeighbourList}}
\index{getNeighbourList@{getNeighbourList}!Particle@{Particle}}
\subsubsection[{getNeighbourList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Spring}$\ast$$>$$\ast$ Particle::getNeighbourList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a6aac04c18bc2b6776682f8ea874a0bea}


return the list of connected springs to the particle 



Definition at line 106 of file Particle.h.



References m\_\-neighbourList.


\begin{DoxyCode}
{ return m_neighbourList; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a6aac04c18bc2b6776682f8ea874a0bea_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_aa2d47cd6b196082fffc22b5f43e6d237}{
\index{Particle@{Particle}!getNetForce@{getNetForce}}
\index{getNetForce@{getNetForce}!Particle@{Particle}}
\subsubsection[{getNetForce}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getNetForce (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_aa2d47cd6b196082fffc22b5f43e6d237}


return the net force on the particle 



Definition at line 91 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ return m_netForce; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_aa2d47cd6b196082fffc22b5f43e6d237_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ab468229903b17bb8cb724f17e5b87e81}{
\index{Particle@{Particle}!getPosition@{getPosition}}
\index{getPosition@{getPosition}!Particle@{Particle}}
\subsubsection[{getPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ab468229903b17bb8cb724f17e5b87e81}


return the current position of the particle 



Definition at line 62 of file Particle.h.



References m\_\-position.


\begin{DoxyCode}
{ return m_position; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ab468229903b17bb8cb724f17e5b87e81_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ad31c8be63589edfba506727773967031}{
\index{Particle@{Particle}!getVelocity@{getVelocity}}
\index{getVelocity@{getVelocity}!Particle@{Particle}}
\subsubsection[{getVelocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getVelocity (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ad31c8be63589edfba506727773967031}


return the current velocity of the particle 



Definition at line 77 of file Particle.h.



References m\_\-velocity.


\begin{DoxyCode}
{ return m_velocity; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad31c8be63589edfba506727773967031_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ac02327c6b70fe3988f5bb99d2b6e33ac}{
\index{Particle@{Particle}!setCurrentPosition@{setCurrentPosition}}
\index{setCurrentPosition@{setCurrentPosition}!Particle@{Particle}}
\subsubsection[{setCurrentPosition}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setCurrentPosition (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-p}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ac02327c6b70fe3988f5bb99d2b6e33ac}


set the current position of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p} & the position to set to \\
\hline
\end{DoxyParams}


Definition at line 74 of file Particle.h.



References m\_\-position.


\begin{DoxyCode}
{ m_position = _p; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ac02327c6b70fe3988f5bb99d2b6e33ac_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ac9c6b664b0d604525e925a46a2fd5a7a}{
\index{Particle@{Particle}!setCurrentVelocity@{setCurrentVelocity}}
\index{setCurrentVelocity@{setCurrentVelocity}!Particle@{Particle}}
\subsubsection[{setCurrentVelocity}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setCurrentVelocity (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ac9c6b664b0d604525e925a46a2fd5a7a}


set the current velocity of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the velocity to set to \\
\hline
\end{DoxyParams}


Definition at line 85 of file Particle.h.



References m\_\-velocity.


\begin{DoxyCode}
{ m_velocity = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ac9c6b664b0d604525e925a46a2fd5a7a_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ac9a7bb87b93c189c2153d1a9e39136ba}{
\index{Particle@{Particle}!setInitialPosition@{setInitialPosition}}
\index{setInitialPosition@{setInitialPosition}!Particle@{Particle}}
\subsubsection[{setInitialPosition}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setInitialPosition (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-p}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ac9a7bb87b93c189c2153d1a9e39136ba}


set the initial position of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p} & the position to set to \\
\hline
\end{DoxyParams}


Definition at line 53 of file Particle.h.



References m\_\-initialPosition.


\begin{DoxyCode}
{ m_initialPosition = _p; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ac9a7bb87b93c189c2153d1a9e39136ba_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ad6f2741011d499235c7a76f56463a952}{
\index{Particle@{Particle}!setMass@{setMass}}
\index{setMass@{setMass}!Particle@{Particle}}
\subsubsection[{setMass}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setMass (
\begin{DoxyParamCaption}
\item[{const float}]{\_\-m}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ad6f2741011d499235c7a76f56463a952}


Definition at line 46 of file Particle.h.



References m\_\-mass.


\begin{DoxyCode}
{ m_mass = _m; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad6f2741011d499235c7a76f56463a952_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a30d4a947df68d23dce7358f290b3a93f}{
\index{Particle@{Particle}!setMoveable@{setMoveable}}
\index{setMoveable@{setMoveable}!Particle@{Particle}}
\subsubsection[{setMoveable}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setMoveable (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a30d4a947df68d23dce7358f290b3a93f}


set the toggle flag for moveability of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-s} & the toggle flag value \\
\hline
\end{DoxyParams}


Definition at line 103 of file Particle.h.



References m\_\-moveable.


\begin{DoxyCode}
{ m_moveable = _s; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a30d4a947df68d23dce7358f290b3a93f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_af2e82dc6a46e33becddce925b3e9c107}{
\index{Particle@{Particle}!setNetForce@{setNetForce}}
\index{setNetForce@{setNetForce}!Particle@{Particle}}
\subsubsection[{setNetForce}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setNetForce (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_af2e82dc6a46e33becddce925b3e9c107}


set the net force on the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-f} & the force to set to \\
\hline
\end{DoxyParams}


Definition at line 95 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ m_netForce = _f; }
\end{DoxyCode}
\hypertarget{class_particle_a6e5693325b3f5b49458e66624576a0a7}{
\index{Particle@{Particle}!setPosition@{setPosition}}
\index{setPosition@{setPosition}!Particle@{Particle}}
\subsubsection[{setPosition}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setPosition (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-p}
\end{DoxyParamCaption}
)}}
\label{class_particle_a6e5693325b3f5b49458e66624576a0a7}


set the position of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p} & the position to set to \\
\hline
\end{DoxyParams}


Definition at line 42 of file Particle.cpp.



References m\_\-lastLastPosition, m\_\-lastPosition, and m\_\-position.


\begin{DoxyCode}
{
    //set position to new value
    m_lastLastPosition = _p;
    m_lastPosition = _p;
    m_position = _p;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a6e5693325b3f5b49458e66624576a0a7_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ad823b77c5f15777b71f2756698c6ec23}{
\index{Particle@{Particle}!setVelocity@{setVelocity}}
\index{setVelocity@{setVelocity}!Particle@{Particle}}
\subsubsection[{setVelocity}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setVelocity (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)}}
\label{class_particle_ad823b77c5f15777b71f2756698c6ec23}


set the velocity of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the velocity to set to \\
\hline
\end{DoxyParams}


Definition at line 62 of file Particle.cpp.



References m\_\-lastVelocity, and m\_\-velocity.


\begin{DoxyCode}
{
    //save current value
    m_lastVelocity = m_velocity;

    //update to new value
    m_velocity = _v;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad823b77c5f15777b71f2756698c6ec23_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a4ea44dad91df2b0374f2d40d44452b76}{
\index{Particle@{Particle}!updatePosition@{updatePosition}}
\index{updatePosition@{updatePosition}!Particle@{Particle}}
\subsubsection[{updatePosition}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::updatePosition (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-p}
\end{DoxyParamCaption}
)}}
\label{class_particle_a4ea44dad91df2b0374f2d40d44452b76}


update the position of the particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p} & the position to update to \\
\hline
\end{DoxyParams}


Definition at line 50 of file Particle.cpp.



References m\_\-lastLastPosition, m\_\-lastPosition, and m\_\-position.


\begin{DoxyCode}
{
    //save last value
    m_lastLastPosition = m_lastPosition;

    //save current value
    m_lastPosition = m_position;

    //update to new value
    m_position = _p;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a4ea44dad91df2b0374f2d40d44452b76_icgraph}
\end{center}
\end{figure}




\subsection{Member Data Documentation}
\hypertarget{class_particle_a24c5edf015f4c3d067acf1a054f31f93}{
\index{Particle@{Particle}!m\_\-id@{m\_\-id}}
\index{m\_\-id@{m\_\-id}!Particle@{Particle}}
\subsubsection[{m\_\-id}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Particle::m\_\-id}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a24c5edf015f4c3d067acf1a054f31f93}


unique id of the particle 



Definition at line 120 of file Particle.h.

\hypertarget{class_particle_a00d22ec44d72c0aacb4512ecf5e15af1}{
\index{Particle@{Particle}!m\_\-initialPosition@{m\_\-initialPosition}}
\index{m\_\-initialPosition@{m\_\-initialPosition}!Particle@{Particle}}
\subsubsection[{m\_\-initialPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-initialPosition}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a00d22ec44d72c0aacb4512ecf5e15af1}


initial position of the particle 



Definition at line 132 of file Particle.h.

\hypertarget{class_particle_a82d9bec60303bd8bd78c73d77d23b30d}{
\index{Particle@{Particle}!m\_\-lastLastPosition@{m\_\-lastLastPosition}}
\index{m\_\-lastLastPosition@{m\_\-lastLastPosition}!Particle@{Particle}}
\subsubsection[{m\_\-lastLastPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-lastLastPosition}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a82d9bec60303bd8bd78c73d77d23b30d}


last last position of the particle 



Definition at line 135 of file Particle.h.

\hypertarget{class_particle_aeeb21b06bc3c2152e452226e2b25a6ea}{
\index{Particle@{Particle}!m\_\-lastPosition@{m\_\-lastPosition}}
\index{m\_\-lastPosition@{m\_\-lastPosition}!Particle@{Particle}}
\subsubsection[{m\_\-lastPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-lastPosition}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_aeeb21b06bc3c2152e452226e2b25a6ea}


last position of the particle 



Definition at line 138 of file Particle.h.

\hypertarget{class_particle_ac5c460e66588981d09c3aa86b920d8bb}{
\index{Particle@{Particle}!m\_\-lastVelocity@{m\_\-lastVelocity}}
\index{m\_\-lastVelocity@{m\_\-lastVelocity}!Particle@{Particle}}
\subsubsection[{m\_\-lastVelocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-lastVelocity}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_ac5c460e66588981d09c3aa86b920d8bb}


last velocity of the particle 



Definition at line 141 of file Particle.h.

\hypertarget{class_particle_ab78b76aeb4d163132a0c27ea4c5beb75}{
\index{Particle@{Particle}!m\_\-mass@{m\_\-mass}}
\index{m\_\-mass@{m\_\-mass}!Particle@{Particle}}
\subsubsection[{m\_\-mass}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Particle::m\_\-mass}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_ab78b76aeb4d163132a0c27ea4c5beb75}


mass of the particle 



Definition at line 123 of file Particle.h.

\hypertarget{class_particle_a2ee234027e38e2fa78acff949d80e8b1}{
\index{Particle@{Particle}!m\_\-moveable@{m\_\-moveable}}
\index{m\_\-moveable@{m\_\-moveable}!Particle@{Particle}}
\subsubsection[{m\_\-moveable}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Particle::m\_\-moveable}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a2ee234027e38e2fa78acff949d80e8b1}


flag for moveability 



Definition at line 147 of file Particle.h.

\hypertarget{class_particle_a99941d7f328aaaa986511113b1512492}{
\index{Particle@{Particle}!m\_\-neighbourList@{m\_\-neighbourList}}
\index{m\_\-neighbourList@{m\_\-neighbourList}!Particle@{Particle}}
\subsubsection[{m\_\-neighbourList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Spring}$\ast$$>$$\ast$ {\bf Particle::m\_\-neighbourList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a99941d7f328aaaa986511113b1512492}


list of connected springs 



Definition at line 150 of file Particle.h.

\hypertarget{class_particle_ad328d5b0f44818766286c928e436d36c}{
\index{Particle@{Particle}!m\_\-netForce@{m\_\-netForce}}
\index{m\_\-netForce@{m\_\-netForce}!Particle@{Particle}}
\subsubsection[{m\_\-netForce}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-netForce}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_ad328d5b0f44818766286c928e436d36c}


net force on the particle 



Definition at line 144 of file Particle.h.

\hypertarget{class_particle_a007f72451152f103007131841c6aa3ee}{
\index{Particle@{Particle}!m\_\-position@{m\_\-position}}
\index{m\_\-position@{m\_\-position}!Particle@{Particle}}
\subsubsection[{m\_\-position}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-position}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a007f72451152f103007131841c6aa3ee}


position of the particle 



Definition at line 126 of file Particle.h.

\hypertarget{class_particle_a31dc45960d8fe1d02407577e46f81b30}{
\index{Particle@{Particle}!m\_\-velocity@{m\_\-velocity}}
\index{m\_\-velocity@{m\_\-velocity}!Particle@{Particle}}
\subsubsection[{m\_\-velocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-velocity}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_particle_a31dc45960d8fe1d02407577e46f81b30}


velocity of the particle 



Definition at line 129 of file Particle.h.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
include/\hyperlink{_particle_8h}{Particle.h}\item 
src/\hyperlink{_particle_8cpp}{Particle.cpp}\end{DoxyCompactItemize}
